package cn.stylefeng.guns.modular.history.enums;

import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;
import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum;
import lombok.Getter;

/**
 * 投票记录表;异常相关枚举
 *
 * @author songq
 * @date 2025/04/22 14:55
 */
@Getter
public enum VoteHistoryExceptionEnum implements AbstractExceptionEnum {

    /**
     * 查询结果不存在
     */
    VOTE_HISTORY_NOT_EXISTED(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE +  "10001", "查询结果不存在")
    ,VOTE_TIME_NOT_EXISTED(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE +  "10002", "无法正确获取投票起止时间")
    ,VOTE_NOT_BEGIN(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE +  "10003", "投票还未开始")
    ,VOTE_END(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE +  "10004", "投票已截止")
    ,VOTE_IP_EXIT(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE +  "10005", "该IP已经投票，请勿重复投票")
    ,VOTE_UNKNOW_ERROR(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE +  "10006", "投票未知错误,请联系管理员")
    ,VOTE_IP_NOTEXIST(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE +  "10007", "无法获取到正确的IP等客户端信息,请联系管理员")
    ,VOTE_NOT_ALLOW_IP(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE +  "10008", "您的IP地址不允许参加本次活动,如有疑问请联系管理员");
	
	/**
     * 无法获取投票起止时间
     */

    /**
     * 错误编码
     */
    private final String errorCode;

    /**
     * 提示用户信息
     */
    private final String userTip;

    VoteHistoryExceptionEnum(String errorCode, String userTip) {
        this.errorCode = errorCode;
        this.userTip = userTip;
    }

}